import request from '/@/utils/request';
//新增案件/物品
export async function postCaseEvidence(params?: object) {
	return await request({
		url: '/case/evidence',
		method: 'post',
		data: params,
	});
}
//查询案件/物品
export async function getCaseEvidence(caseid?: string) {
	return await request({
		url: '/case/' + caseid + '/evidence',
		method: 'get',
	});
}
//查询案件/物品
export async function getCaseEvidenceByIds(ids: Array) {
	return await request({
		url: '/case/evidencebyids',
		method: 'post',
		data: {ids:ids},
	});
}
export async function putCase(params?: object) {
	return await request({
		url: '/case',
		method: 'put',
		data: params,
	});
}
//查询历史案件
export async function queryCaseHistory(params?: object) {
	return await request({
		url: '/case/queryCaseHistory',
		method: 'post',
		params
	});
}
//查询案件
export async function getCasePager(params?: object) {
	return await request({
		url: '/case/pager',
		method: 'get',
		params,
	});
}
//查询案件流转
export async function getCaseTransferePager(params?: object) {
	return await request({
		url: '/case/pager/transfere',
		method: 'get',
		params,
	});
}

//删除案件
export async function deleteCase(params?: object) {
	return await request({
		url: '/case',
		method: 'delete',
		data: params,
	});
}

//删除案件
export async function checkEvidenceAuditState(params?: object) {
	return await request({
		url: '/approve/checkEvidenceAuditState',
		method: 'post',
		data: params,
	});
}
 
//查询案件
export async function getCaseAttach(params?: object) {
	return await request({
		url: '/case/pager/caseattach',
		method: 'post',
		data:params,
	});
}

//删除案件
export async function deleteCaseAttach(params?: object) {
	return await request({
		url: '/case/delete/caseattach',
		method: 'delete',
		data: params,
	});
}
//删除案件
export async function cancelMatchCaseAttach(params?: object) {
	return await request({
		url: '/case/cancelmatch/caseattach',
		method: 'post',
		data: params,
	});
}

//上传附件拍照
export async function UploadCamerAttr(caseid,  evidenceId,  url) {
	return await request({
		url: '/common/upload/camerAttr/'+caseid+'/'+evidenceId+'/'+encodeURIComponent(url),
		method: 'get',
	});
}

//删除案件
export async function matchCaseAttachToEvidence(params?: object) {
	return await request({
		url: '/case/matchEvidence',
		method: 'post',
		data: params,
	});
}

//查询盘点任务
export async function getPanDianPager(params?: object) {
	return await request({
		url: '/v2/handheld/pager',
		method: 'post',
		data: params,
	});
}
//查询盘点任务
export async function getPanDianDetail(params?: object) {
	return await request({
		url: '/v2/handheld/pandiandetail',
		method: 'get',
		params,
	});
}
//查询盘点任务
export async function deletePanDianTask(data?: object) {
	return await request({
		url: '/v2/handheld/deletePanDianTask',
		method: 'post',
		data,
	});
}

//添加盘点任务
export async function savePanDianTask(params?: object) {
	return await request({
		url: '/v2/handheld',
		method: 'post',
		data: params,
	});
}
